package com.tianji.learning.controller;


import com.tianji.learning.domain.query.PointsBoardQuery;
import com.tianji.learning.domain.vo.PointsBoardVO;
import com.tianji.learning.service.IPointsBoardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 学霸天梯榜 前端控制器
 * </p>
 *
 * @author xzh
 * @since 2024-03-18
 */
@RestController
@RequestMapping("/boards")
@RequiredArgsConstructor(onConstructor_ = {@Lazy})
@Api(tags = "查询天体排行榜相关接口")
public class PointsBoardController {

    private final IPointsBoardService pointsBoardService;

    /**
     * 获得天梯榜排名信息
     * @param query
     * @return
     */
    @GetMapping
    @ApiOperation(value = "获得天梯榜排名信息")
    public PointsBoardVO queryPointsBoardPageList(PointsBoardQuery query){
        return pointsBoardService.queryPointsBoardPageList(query);
    }
}
